CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

#SET(gtest_VERSION_MAJOR 1)
#SET(gtest_VERSION_MINOR 1)
#SET(gtest_API_VERSION ${gtest_VERSION_MAJOR})

SET(gtest_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/gtest ${CMAKE_SOURCE_DIR}/gtest/include)
SET(gtest_SOURCES_DIR ${CMAKE_SOURCE_DIR}/gtest)

AUTO_SOURCES(files "*.cc" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}")
LIST(APPEND gtest_SOURCES ${files})

AUTO_SOURCES(files "*.h" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}")
LIST(APPEND gtest_SOURCES ${files})

#ADD_LIBRARY(gtest-static STATIC ${gtest_SOURCES})
#ADD_LIBRARY(gtest-shared SHARED ${gtest_SOURCES})

#INCLUDE_DIRECTORIES(${gtest_INCLUDE_DIR} ${gtest_SOURCES_DIR})

#SET_TARGET_PROPERTIES(gtest-static PROPERTIES OUTPUT_NAME "gtest")
#SET_TARGET_PROPERTIES(gtest-shared PROPERTIES OUTPUT_NAME "gtest")

SET(gtest_SOURCES ${gtest_SOURCES} PARENT_SCOPE)
SET(gtest_INCLUDE_DIR ${gtest_INCLUDE_DIR} PARENT_SCOPE)
SET(gtest_SOURCES_DIR ${gtest_SOURCES_DIR} PARENT_SCOPE)

#SET_TARGET_PROPERTIES(gtest-shared PROPERTIES VERSION ${gtest_VERSION_MAJOR}.${gtest_VERSION_MINOR} SOVERSION ${gtest_API_VERSION})